package com.song.tengxunmessage;

import com.github.qcloudsms.SmsSingleSender;
import com.github.qcloudsms.SmsSingleSenderResult;
import com.github.qcloudsms.httpclient.HTTPException;

import java.io.IOException;

public class TengxunMessage {

    private static int appId = 1400090070 ;
    private static String appkey = "7435da856e0afd380d69ae6c20fe74fa";
    static String[] phoneNumbers = {"15638574219"};

    public static void main(String[] args) throws HTTPException, IOException {

        SmsSingleSender ssender = new SmsSingleSender(appId, appkey);
        SmsSingleSenderResult result = ssender.send(0, "86", phoneNumbers[0], "测试短信内容", "", "");
        System.out.println("-----");
        System.out.println(result.errMsg);
        System.out.println(result.ext);

    }
}
